<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>timer button的测试页面</title>
  <link rel="stylesheet" href="./timer-button.css">
</head>
<body>
<input type="button" value="添加定时器按钮" id='add'/>
<br/>
<div id='main'>

</div>
<script src="//apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="./timer-button.js"></script>
<script>
  $(function(){
      $timerButton.show({
        delay:20,
        title:'发送验证码',
        onclick:function(){
          alert('短信已发送！');
        }
      })

      var $btnAdd = $('#add');
      
      $btnAdd.click(function(){
        console.log('add timer button');
        $timerButton.show({
          delay:10,
          title:'发送短信验证码',
          onclick:function(){
          console.log('clicked');
        }
      });
    })
  })
</script>
</body>
</html>
